<?php
$this->breadcrumbs = array(
    'Invoice' => array('index'),
    'Manage',
);
?>
<div class="box">
    <header>
        <h5><i class="icon icon-user"></i> - Manager invoice</h5>
    </header>
    <div class="box">

	<?php
	$this->widget('bootstrap.widgets.TbGridView', array(
	    'id' => 'user-grid',
	    'dataProvider' => $model->search(),
	    'filter' => $model,
	    'columns' => array(
		array(
		    'header' => 'Username',
		    'name' => 'userName',
		    'type' => 'raw',
		    'value' => function($data) {
			return "<a href='" . BACKEND_SITE_URL . "user/member/update?id=" . @$data->user->user_id . "'>" . h(@$data->user->username, 10) . "</a>";
		    }
		),
		array(
		    'header' => 'Price( $ )',
		    'name' => 'total',
		    'filter' => false
		),
		'payment_code',
		array(
		    'name' => 'created',
		    'type' => 'datetime',
		    'value' => function($data) {
			return date('d-m-Y', $data->created);
		    },
		    'filter' => false
		),
	    ),
	));
	?>
    </div>
</div>
